package lib

func init() {
	Probs = append(Probs, Problem{
		Num:         171,
		Discription: "exceal表号转序列号",
		Level:       1,
		Labels: map[string]int{
			"数学": 1,
		},
	})
}

// titleToNumber 26进制转10进制
//  @param columnTitle
//  @return int
func TitleToNumber(columnTitle string) int {
	num := 0
	rate := 1
	for i := len(columnTitle) - 1; i >= 0; i-- {
		num += (int(columnTitle[i]-'A') + 1) * rate
		rate *= 26
	}

	return num
}
